package one.chchy.demo.sprintsecurity;

/**
 * Created by lutery on 2017/6/19.
 */
public enum ResponseCode {

    SUCCESS(0, "执行成功"),
    ERROR(-1, "执行出错"),
    EADDUSER(-10, "添加用户失败"),
    NOTEXIST(-11, "资源不存在"),
    ErrorSearchParse(-450, "查询解析状态错误"),
    ErrorRefreshToken(-495, "更新验证信息出错"),
    NoLogin(-496, "没有登录，请重新登录"),
    NoUser(-497, "该用户不存在"),
    ErrorAddress(-498, "登录地址异常"),
    AuthorizedExp(-499, "验证信息过期"),
    Unauthorized(-401, "身份校验出错");

    private final int code;
    private final String desc;

    ResponseCode(int code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public int getCode(){
        return code;
    }

    public String getDesc(){
        return desc;
    }
}
